/**
 * ********************************************************
 * <p>
 * Copyright (c) 2018 Baidu.com, Inc. All Rights Reserved
 * <p>
 * ********************************************************
 *
 * @date: 2020年04月02日
 * @author: cuixuefei
 * @description: 资源操作
 */
package com.baidu.mpks.backendweb.source.dao;

import org.apache.ibatis.annotations.Param;

import com.baidu.mpks.datasource.domain.Source;
import com.baidu.mpks.datasource.domain.StructInfo;

public interface SourceManageDao {
    public Integer addSource(Source source);

    public Integer addStructInfoWithoutTotal(StructInfo structInfo);

    public Integer addStructInfoWithTotal(StructInfo structInfo);

    public void deleteSourceByNodeId(@Param("nodeId") Integer nodeId);

    public void updateSourceNameAndContent(@Param("id") Integer id, @Param("name") String name,
            @Param("content") String content, @Param("updateBy") String updateBy);

    public void updateSourceFlag(@Param("id") Integer id, @Param("finishFlag") Integer finishFlag);

    public void updateStatusById(@Param("id") Integer id, @Param("status") Integer status);

    public void updateSourceTotal(@Param("id") Integer id, @Param("total") Long total);

    public void updateStructInfoTotalById(@Param("id") Integer id, @Param("total") Long total);

    public void updateStructInfoTotalByName(@Param("sourceId") Integer sourceId, @Param("name") String name,
            @Param("total") Integer total);

    public void deleteSource(@Param("id") Integer id);

    public void deleteStructInfoById(@Param("id") Integer id);

    public void deleteStructInfoBySourceId(@Param("sourceId") Integer sourceId);

}
